package finalproject.util.datastructure;
/**
 * 
 * @author tijani
 *
 * @param <k> key
 * @param <v> value
 * @param <z> specificator
 */
public interface Association<k,v,z> {
    
    
    
    /*
     * Association exemple [(k1,v1), (k2,v2),......,(kn,vn)]
     * ki & vi have at least a field of a commune type : z
     */
    
    
    
    /**
     * 
     * @return if the association is complete
     */
    boolean isComplete();
    
    
    
    /**
     * 
     * @param key
     * @return if contain the key given
     */
    boolean containsKey(k key);
    
    
    
    /**
     * 
     * @param value
     * @return if contain the value given
     */
    boolean containsValue(v value);
    
    
    
    /**
     * 
     * @param key
     * @return true if the key given was added, false if not
     */
    boolean addKey(k key);
    
    
    
    /**
     * 
     * @param value
     * @return true if the value given was added, false if not
     */
    boolean addValue(v value);
    
    
    
    /**
     * 
     * @param key
     * @return true if the key was erased, false if not
     */
    boolean eraseKey(k key);
    
    
    /**
     * 
     * @param value
     * @return true if the value was erased, false if not
     */
    boolean eraseValue(v value);
    
    
    /**
     * 
     * @param valueSpec
     * @return true if a key with the specificator of the value was found, false if not
     */
    boolean containskeyOf(z valueSpec);
    
    
    /**
     * 
     * @param specificator
     * @return the key if a key with it specificator was found
     */
    k getKeyWith(z specificator);
    
    /**
     * 
     * @param specificator
     * @return the value if a key with it specificator was found
     */
    v getValueWith(z specificator);
    
    /**
     * 
     * @param i
     * @return key found in the index i
     */
    k getKey(int i);
    
    /**
     * 
     * @param j
     * @return value found in the value j
     */
    v getValue(int j);
    
    /**
     * 
     * @return the size of the association
     */
    int size();

}
